package com.ruicar.afs.cloud.seats.feign;

import com.ruicar.afs.cloud.common.core.util.IResponse;
import com.ruicar.afs.cloud.seats.condition.SysUserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;

/**
 * @author tiankai
 * @Describe 获取用户信息
 * Created on 2020-05-15
 */
@FeignClient(value = "${com.ruicar.service-names.admin-server}")
public interface UserDetailsInfoFeign {

    /**
     * 查询所有用户
     *
     * @return
     */
    @RequestMapping(value = "/user/getAll", method = RequestMethod.GET)
    public IResponse<List<SysUserDto>> getAllUser();

    /**
     * @Description 根据部门id获取所有用户
     * @Author Peng_Jinbo
     * @Date 2020/7/9 21:54
     */
    @GetMapping("/user/getByDepartmentId/{departmentId}")
    IResponse<List<SysUserDto>> getUsersByDepartmentId(@PathVariable("departmentId") String departmentId);


    /**
     * @Description 根据部门id获取部门
     * @Author tiankai
     * @Date 2020/7/9 21:54
     */
    @PostMapping(value = "/department/getDeptInfoById/{id}")
    IResponse<SysUserDto> getDeptInfo(@PathVariable("id") Long id);

    /**
     * @Description 获取指定用户信息
     * @Author tiankai
     * @Date 2020/7/28 21:54
     */
    @GetMapping("/user/info/{username}")
    public IResponse info(@PathVariable("username") String username);
}
